<!DOCTYPE html>
<html lang="vi-VN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><?php echo CHtml::encode($this->pageTitle); ?></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="HandheldFriendly" content="true" />

<link href='http://fonts.googleapis.com/css?family=Open+Sans:400&subset=latin,vietnamese' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="<?php echo tu() ?>/css/styles.css?v=1.1.1.2" media="all" />
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="<?php echo tu() ?>/css/styles_ie.css?v=1.0.0" media="all" />
<![endif]-->
<link rel="stylesheet" type="text/css" href="<?php echo tu() ?>/css/responsive.css?v=1.1.1.2" media="all" />
<link rel="stylesheet" type="text/css" href="<?php echo tu() ?>/css/jquery.jcrop.min.css?v=0.9.12" media="all" />

<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>
<?php Yii::app()->clientScript->registerScriptFile(tu() .'/js/dialog.src.js'); ?>
<?php Yii::app()->clientScript->registerScriptFile(tu() .'/js/tooltip.min.js'); ?>
<?php Yii::app()->clientScript->registerScriptFile(tu() .'/js/jquery.appear-1.1.1.js'); ?>
<?php Yii::app()->clientScript->registerScriptFile(tu() .'/js/jquery.unveil.js?v=1.124'); ?>
<?php Yii::app()->clientScript->registerScriptFile(tu() .'/js/core.js'); ?>
<?php Yii::app()->clientScript->registerScriptFile(tu() .'/js/ajax.js'); ?>
<?php Yii::app()->clientScript->registerScriptFile(tu() .'/js/modernizr.js'); ?>

<?php Yii::app()->clientScript->registerScriptFile(tu() .'/js/plupload.full.min.js?v=2.1.1', CClientScript::POS_END); ?>
<?php Yii::app()->clientScript->registerScriptFile(tu() .'/js/jquery.jcrop.min.js?v=0.9.12', CClientScript::POS_END); ?>
<?php Yii::app()->clientScript->registerScriptFile(tu() .'/js/jquery.cycle2.js?v=20140415', CClientScript::POS_END); ?>
<?php Yii::app()->clientScript->registerScriptFile(tu() .'/js/jquery.dotdotdot.min.js?v=1.6.12', CClientScript::POS_END); ?>
<?php Yii::app()->clientScript->registerScriptFile(tu() .'/js/jquery.imagesloaded.js?v=3.0.4', CClientScript::POS_END); ?>
<?php Yii::app()->clientScript->registerScriptFile(tu() .'/js/jquery.wookmark.js?v=1.4.6', CClientScript::POS_END); ?>
<?php Yii::app()->clientScript->registerScriptFile(tu() .'/js/app.js?v=1.1.1.2', CClientScript::POS_END); ?>
<?php Yii::app()->clientScript->registerScriptFile(tu() .'/js/app-model.js?v=1.1.1.2', CClientScript::POS_END); ?>

<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<script type="text/javascript">
	var lang = {
		confirmation: '<?php echo t('Confirmation') ?>',
		continuous: '<?php echo t('Continuous') ?>',
		update_account: '<?php echo t('Update Account') ?>',
		login: '<?php echo t('Login') ?>',
		register: '<?php echo t('Register') ?>',
		forgotpass: '<?php echo t('Forgot Password') ?>',
		success: '<?php echo t('Success') ?>',
		ok: '<?php echo t('OK') ?>',
		delete_confirmation: '<?php echo t('Are you sure to delete this item?') ?>',
		save: 'Save',
		close: 'Close',
		loading: 'Proccessing...',
		notice: 'Notice',
		warning: 'Warning',
		error: 'Error',
		error_ajax: 'Error',
		text_are_you_sure_to_proceed: 'Are you sure ?',
		text_page_loading: 'Proccessing...',
		yes: 'Yes',
		no: 'No',
		view_more: 'More',
		collapse: 'Less',
		next: 'Next',
		previous: 'Previous'
	};
	var index_script = '<?php echo bu('/') ?>';
	var id_index_script = '<?php echo param('idUrl') ?>';
	var changes_warning = 'N';
	var images_dir = '<?php echo tu('/images') ?>';
	var translate_mode = false;
	var currencies = {
		'primary': {
			'decimals_separator': ',',
			'thousands_separator': '.',
			'decimals': '0'
		}
	};
	$(document).ready(function(){
		jQuery.runCart('C');
	});
</script>

</head>
	
<body class="<?php echo $this->getBodyClasses() ?>" itemscope itemtype="http://schema.org/WebPage">
	 
	<div id="ajax_loading_box" class="ajax-loading-box"><div class="right-inner-loading-box"><div id="ajax_loading_message" class="ajax-inner-loading-box"><?php echo t('Loading') ?></div></div></div>
	<?php $this->renderPartial('//layouts/search_bar') ?>
	<div class="site-container">
		
		<header class="site-header"  id="x-main-header">
			<div class="wrap" id="top_banner_head">
				
				<div class="search-form">
					<form method="get" action="<?php echo $this->createUrl('/site/search') ?>">
						<input type="search" placeholder="Type name, email or user name..." value="" name="search_query" class="search-input">
						<input type="submit" value="Search" name="submit" class="search-submit">
					</form>
				</div>
				
				<div class="right-tools text-right">
					<!-- Mobile menu -->
					<?php $this->renderPartial('//blocks/layout/navigation_mobile') ?>
					
					<!-- User menu -->
					<?php $this->renderPartial('//common/user_block') ?>
				</div>
				
			</div>
		</header>
		
		<nav class="nav-primary">
			<div class="wrap">
				<?php $this->renderPartial('//blocks/layout/navigation') ?>
			</div>
		</nav>
		
		<div class="site-body">
			<div class="site-inner">
				<?php echo $content ?>
			</div>
		</div>
		
		<footer class="site-footer">
			<div class="wrap">
				<?php
				if ( $this->beginCache((IS_MOBILE ? "1" : "0") . 'site_footer', array('duration' => CACHE_TIME)) ) {
					$this->renderPartial('//blocks/layout/footer');
					
					$this->endCache();
				} ?>
			</div>
		</footer>
		
	</div>
	<?php $this->renderPartial('//common/notification'); ?>
	
	<script language="javascript">
		function loadimg() {$("img.lazy").unveil(300);}
		// javascript code
		setTimeout(loadimg, 500);
		$( document ).ajaxComplete(function() {
		  setTimeout(loadimg, 50);
		});
	</script>
</body>
</html>